﻿#region << 版 本 注 释 >>
/*----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *----------------------------------------------------------------*/
#endregion << 版 本 注 释 >>using System;
using System.Reflection;
using Microsoft.EntityFrameworkCore;
using Microsoft.Identity.Client;
using seejee_Backendium.Core.Models;

namespace seejee_Backendium.Data.DbContest
{
    public class DataSourcesDbContext : DbContext
    {
        private readonly string _connectionString;

        public DataSourcesDbContext(string connectionString)
        {
            _connectionString = connectionString;
        }

        public DataSourcesDbContext(DbContextOptions<DataSourcesDbContext> options) : base(options)
        {
        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
                optionsBuilder.UseSqlServer(_connectionString);
            }
        }
    }
}
